!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <link rel="stylesheet" href="../css/newlist.css">
    <link rel="stylesheet" href="../css/reset.css">
</head>
<body>
    <header></header>
    <section>
       
            <div class="show">
                <!-- <div class="box">
                    <a href="#">
                    <p><img src="../image/428_428_35EE5D857B65FC1AB3C219B73F4010055C30FF11E532D002mp.png" alt=""></p>
                    <p>荣耀平板 Z3 9.7英寸</p>
                    <p><span>￥1399起</span><b>多款可选</b></p>
                    <p><strong class="mm">赠送积分</strong></p>
                    <p><em >暂无评价</em></p>
                    <h6>暂时缺货</h6>
                </a>
                </div> -->
            </div>
        </div>
    </section>
    <footer></footer>
    
</body>
</html>
<script src="../js/jQuery.js"></script>
<script>
    
    $(function(){
        $.get("../goodsAndShoppingCart/getGoodsList.php",{
            typeId:"007"
        },function(data){
            console.log(JSON.parse(data));
            let arr = JSON.parse(data);
            let str = ``;
            arr.forEach((item,index) => {
                // console.log(element.goodsName);
                
                str += `<div class="box item-${index}" id="${item.goodsId}">
                    <a href="#">
                    <p><img src="${item.goodsImg}" alt=""></p>
                    <p>${item.goodsName}</p>
                    <p><span>￥${item.goodsPrice}起</span><b>${item.beiyong1}</b></p>
                    <p><strong class="mm">${item.beiyong2}</strong></p>
                    <p><em >${item.beiyong4}</em></p>
                </a>
                </div>`
            });
            $(".show").html(str);
        })
        $.get("../goodsAndShoppingCart/getGoodsListNew.php",function(data){
            console.log(data);
            let arr1 = JSON.parse(data);
            console.log(arr1) 
            let arr2 = arr1[2];
            $(".top").html(arr2.goodsType);
            })
        });
</script>